import requests

#请求的URL
url = 'https://fanyi.baidu.com/sug'
#UA伪装
headers = {
    'User-Agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36'
}

while True:
    word = input("请输入需要翻译的英文内容：")
    data = {
        "kw": word
    }
    respones = requests.get(url=url, headers=headers, params=data)
    respones.encoding = 'utf-8'

    print(respones.json().get('data')[0].get('v'))
